unit UTipoOperacao;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RLReport, DB, DBTables;

type
  TFTipoOperacao = class(TForm)
    RLReport1: TRLReport;
    RLBand1: TRLBand;
    RLBand2: TRLBand;
    RLBand3: TRLBand;
    QRelatorio: TQuery;
    DSRelatorio: TDataSource;
    RLDBText1: TRLDBText;
    RLDBText2: TRLDBText;
    RLLabel1: TRLLabel;
    RLLabel2: TRLLabel;
    RLLabel3: TRLLabel;
    RLLabel4: TRLLabel;
    RLLabel5: TRLLabel;
    RLLabel6: TRLLabel;
    RLLabel7: TRLLabel;
    RLLabel8: TRLLabel;
    RLLabel9: TRLLabel;
    RLBand4: TRLBand;
    RLLabel10: TRLLabel;
    RLDBResult1: TRLDBResult;
    RLLabel11: TRLLabel;
    RLLabel12: TRLLabel;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure RLBand3BeforePrint(Sender: TObject; var PrintIt: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FTipoOperacao: TFTipoOperacao;

implementation

{$R *.dfm}

procedure TFTipoOperacao.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin

  FTipoOperacao:=nil;

end;

procedure TFTipoOperacao.RLBand3BeforePrint(Sender: TObject;
  var PrintIt: Boolean);
begin

   if DSRelatorio.DataSet.FieldByName('tipvend_deb_cred_pis').AsString  = '1' then
     RLLabel8.Caption:= 'S'
   else if DSRelatorio.DataSet.FieldByName('tipvend_deb_cred_pis').AsString  = '0' then
     RLLabel8.Caption:= 'N'
   else
     RLLabel8.Caption:= 'N';


   if DSRelatorio.DataSet.FieldByName('tipvend_deb_cred_cofins').AsString  = '1' then
     RLLabel9.Caption:= 'S'
   else if DSRelatorio.DataSet.FieldByName('tipvend_deb_cred_cofins').AsString  = '0' then
     RLLabel9.Caption:= 'N'
   else
     RLLabel9.Caption:= 'N';

end;

end.
